PDF Plugin for Xojo

Page.MoveTextPosition Method (console safe)

Moves the current text position by x, y, so after calling this the position will be oldX + x, oldY + y.

MoveTextPosition(
   x as Single,
   y as Single)

Parameters

x
The amount to offset in x direction.
y
The amount to offset in y direction. (Remember in PDF then y starts from bottom of the page)

Remarks

GraphicsMode should beGraphicsMode must be TEXT_OBJECT when calling this method.

In this example the 10,700 coordinate is absolute position since we know that current position before calling MoveTextPosition was 0,0 because BeginText sets the current position to 0,0


if myFont <> nil then
    myPage.BeginText()
    myPage.MoveTextPosition(10,700)
    myPage.SetFont(myFont,12)
    myPage.ShowText("Some text”)
    myPage.EndText()
end if

See Also

Page Class